package crack3d.lshape.mesh1;

import math2.MathUtilities;
import crack3d.AbstractLshape3dUsingSDAElement;
import fem2.AbstractStructuralCrackDemo;
import fem2.Element;
import fem2.MaterialModel;
import fem2.MeshPart;
import fem2.Model;
import fem2.element.crack_sda.SKONConstantJumpTetrahedraElement;
import fem2.material.cohesive_law.CohesiveLaw;
import fem2.material.cohesive_law.Mode1ExponentialCohesiveLaw;

public class Lshape3dMesh1_SKONConstantJumpTetrahedraElement_ExponentialCohesiveLaw extends
		AbstractLshape3dUsingSDAElement {

	public Lshape3dMesh1_SKONConstantJumpTetrahedraElement_ExponentialCohesiveLaw() {
		meshFileName = "mesh1-skon-exp.msh";
	}

	@Override
	public Element createElement(MeshPart mp, MaterialModel mm, CohesiveLaw cl) {
		return new SKONConstantJumpTetrahedraElement(mp, mm, cl);
	}

	@Override
	public CohesiveLaw createCohesiveLaw(Model m) {
		double ft = 2.7;
		double Gf = 0.065;
		double km1 = 1e15;
		double km2 = 1e15;
		return new Mode1ExponentialCohesiveLaw(Gf, ft, km1, km2);
	}

	public static void main(String[] args) {
		AbstractStructuralCrackDemo demo = new Lshape3dMesh1_SKONConstantJumpTetrahedraElement_ExponentialCohesiveLaw();

		// double[] lambda = LinAlgUtilities.createLambdaArray(17.1, 0.1, 17.2);
		// double[] lambda = LinAlgUtilities.createLambdaArray(17.1, 0.1, 20);
		// double[] lambda = LinAlgUtilities.createLambdaArray(17.1, 0.1, 25);
		// double[] lambda = LinAlgUtilities.createLambdaArray(17.1, 0.1, 30);
		// double[] lambda = LinAlgUtilities.createLambdaArray(17.1, 0.1, 35);
		// // something
		// // intersting
		double[] lambda = MathUtilities.createLambdaArray(17.1, 0.1, 40); // interesting
																			// result

		demo.run(lambda);
	}
}
